﻿Imports BusinessRule.DTO

'Description:物料采购类
'Copyright (c) : 通力凯顿（北京）系统集成有限公司
'Writer:Wangjh
'create Date:20190411
'Rewriter:
'Rewrite Date:
Public Interface uLMSMaterialPlanIBusiness
    ''' <summary>
    ''' 导入采购计划
    ''' </summary>
    ''' <param name="dt"></param>
    ''' <param name="strMsg"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function LeadInProcurementPlan(ByRef dt As DataTable, ByVal UserInfo As CurrentUserInfo) As Boolean

    ''' <summary>
    ''' 导入缺件计划
    ''' </summary>
    ''' <param name="dt"></param>
    ''' <param name="UserInfo"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function LeadInMaterialMissingPlan(ByRef dt As DataTable, ByVal UserInfo As CurrentUserInfo) As Boolean

    ''' <summary>
    ''' 导入需求投料计划
    ''' </summary>
    ''' <param name="dt"></param>
    ''' <param name="UserInfo"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function LeadInFeedingDemandPlan(ByRef dt As DataTable, ByVal UserInfo As CurrentUserInfo) As Boolean
    ''' <summary>
    ''' 获取采购计划
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetProcurementPlan(ByVal QueryCondition As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 获取采购计划
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetProcurementPlanDt(ByVal QueryCondition As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 更新预计到货时间
    ''' </summary>
    ''' <param name="id"></param>
    ''' <param name="expectDate"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateExpextDate(ByVal id As String, ByVal expectDate As String, ByVal expectNote As String) As Boolean

    ''' <summary>
    ''' 获取最大批次号
    ''' </summary>
    ''' <param name="materialName"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetMaxMaterialBatch(ByVal materialName As String) As Integer

    ''' <summary>
    ''' 获取最大批次号
    ''' </summary>
    ''' <param name="materialName"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetMaxMaterialBatch(ByVal materialName As String, ByVal batchType As String) As Integer

    ''' <summary>
    ''' 插入批次
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InserMaterialBatch(ByVal para As Dictionary(Of String, String), ByRef strMsg As String) As Boolean
    ''' <summary>
    ''' 获取物料批次（传参key必须为表的字段）
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetMaterialBatch(ByVal para As Dictionary(Of String, Object)) As DataTable

    ''' <summary>
    ''' 获取待检验的物料批次
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetMaterialBatchCheck(ByVal para As Dictionary(Of String, String)) As uMESProcessResult


    ''' <summary>
    ''' 保存检验数据
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function SaveCheckInfo(ByVal para As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' 更新表数据根据某些条件
    ''' </summary>
    ''' <param name="updatePara"></param>
    ''' <param name="conditionPara"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function UpdateTableByField(ByVal tableName As String, ByVal updatePara As Dictionary(Of String, Object), ByVal conditionPara As Dictionary(Of String, String)) As Boolean

    ''' <summary>
    ''' 查询表数据根据某些条件
    ''' </summary>
    ''' <param name="tableName"></param>
    ''' <param name="conditionPara"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetTableInfoByField(ByVal tableName As String, ByVal conditionPara As Dictionary(Of String, String), ByVal conditionLikePara As Dictionary(Of String, String)) As DataTable
    ''' <summary>
    ''' 插入物料领用信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function InsertMaterialReceipt(ByVal para As Dictionary(Of String, String)) As Boolean
    ''' <summary>
    ''' 插入物料批次领用信息
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Sub InsertMaterialReceiptDetail(ByVal ListPara As List(Of Dictionary(Of String, String)))
    ''' <summary>
    ''' 获取已申请待发料的领料信息
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetApplyedMaterialReceipt(ByVal QueryCondition As Dictionary(Of String, String)) As uMESProcessResult

    ''' <summary>
    ''' 根据件号属性查询默认件号信息
    ''' </summary>
    ''' <param name="QueryCondition"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetProductByAttibute(ByVal QueryCondition As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 物料计划修改记录
    ''' </summary>
    ''' <param name="addData"></param>
    ''' <param name="strMsg"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function AddMaterialplanTableDataRecord(ByVal addData As Dictionary(Of Dictionary(Of String, String), List(Of Dictionary(Of String, String))), ByRef strMsg As String) As Boolean


    ''' <summary>
    ''' 根据条件查询投料需求计划
    ''' </summary>
    ''' <param name="para"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetFeedingdemandplan(ByVal para As Dictionary(Of String, String)) As DataTable

    ''' <summary>
    ''' 查询指定件号和采购计划的到料数情况
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetFeedingArrivalInfo(ByVal drawingno As String, ByVal procurementplanno As String) As DataTable
End Interface
